//
//  CustomPhoneTextFiled.swift
//  EasyTrademarkRegqurySearch
//
//  Created by 伊伊 on 2024/2/29.
//

import UIKit

class CustomPhoneTextFiled: UITextField {
    var marginEdges = UIEdgeInsets.zero

    override func textRect(forBounds bounds: CGRect) -> CGRect {
        let rect = super.textRect(forBounds: bounds)
        return rect.inset(by: self.marginEdges)
    }

    override func editingRect(forBounds bounds: CGRect) -> CGRect {
        let rect = super.editingRect(forBounds: bounds)
        return rect.inset(by: self.marginEdges)
    }
    override func clearButtonRect(forBounds bounds: CGRect) -> CGRect {

        let rect = CGRect(x:bounds.size.width - self.marginEdges.right, y:(bounds.size.height - 20)/2, width: 20, height: 20)


        return rect
    }
}
